<template>
  <div class="container">
    <child-navtor></child-navtor>
    <form-dialog
      v-model="showDialog1"
      @submit1="handleSubmit1"
      :parentData1="message1"
    ></form-dialog>
    <div class="box1">
      <div>
        <div class="ee">
           <div @click="ranks" class="circle">
            <img
              src="../../assets/images/icon_txm.png"
              alt=""
            />
          </div>
          <div @click="rank" class="circle">
            <img
              src="../../assets/images/b79031a7b47c874c055f474e1d48be4970f24ed6252e-RU07Ix.png"
              alt=""
            />
          </div>
          <div class="circle" @click="showDialog1 = true">
            <img src="../../assets/images/_20240521231143.png" alt="" />
          </div>
        </div>
      </div>
    </div> 
    <div class="box2" id="box2">
      <div class="box2-content">
        <p>
          中医体质辨识软件是判断中医体质分类的标准化工具，依据中华中医药学会《中医体质分类与判定》
          标准开发。软件是在中医体质理论指导下，根据量表设计原理，以问询录入的方式，采集居民健康信
          息﹔通过对9种体质分值的结果分析,来判断体质类型.
        </p>
      </div>
    </div>
    <div class="ryxx">
      <div class="title">
        当前体质辨识人员信息展示
      </div>
      <div class="ry">
        <div class="t1">
          <p class="pdd">最近体质辨识日期</p>
          <input
            type="text"
            class="inputs"
            v-model="user.Tz_End.Tz_EndDate"
            :disabled="isDisabled"
          />
        </div>
        <div class="t1">
          <p class="pdd">最近体质辨识结果</p>
          <input
            type="text"
            class="inputs"
            v-model="user.Tz_End.Tz_EndRlt"
            :disabled="isDisabled"
          />
        </div>
        <!-- <div class="t1">
          <p class="pdd">最近体质辨识分数</p>
          <input
            type="text"
            class="inputs"
            v-model="user.Tz_End.Tz_EndRltScore"
            :disabled="isDisabled"
          />
        </div> -->
        <div class="t1">
          <p class="pdd">体检编号</p>
          <input
            type="text"
            class="inputs"
            v-model="user.Get_CheckSub_Data1.Check_No"
            :disabled="isDisabled"
          />
        </div>
        <div class="t1">
          <p class="pdd">体检日期</p>
          <input
            type="text"
            class="inputs"
            v-model="user.Get_CheckSub_Data1.Check_Date"
            :disabled="isDisabled"
          />
        </div>
        <div class="t1">
          <p class="pdd">姓名</p>
          <input
            type="text"
            class="inputs"
            v-model="user.Get_CheckSub_Data1.Pson_Name"
            :disabled="isDisabled"
          />
        </div>
        <div class="t1">
          <p class="pdd">年龄</p>
          <input
            type="text"
            class="inputs"
            v-model="user.Get_CheckSub_Data1.Pson_Age"
            :disabled="isDisabled"
          />
        </div>
        <div class="t1">
          <p class="pdd">身份证号</p>
          <input
            type="text"
            class="inputs"
            v-model="user.Get_CheckSub_Data1.Pson_CardID"
            :disabled="isDisabled"
          />
        </div>
        <div class="t1">
          <p class="pdd">人群类型</p>
          <input
            type="text"
            class="inputs"
            v-model="user.Get_CheckSub_Data1.Pson_Type"
            :disabled="isDisabled"
          />
        </div>
        <div class="t1">
          <p class="pdd">BMI</p>
          <input
            type="text"
            class="inputs"
            v-model="user.Get_CheckSub_Data1.Sub_Bmi"
            
          />
        </div>
        <div class="t1">
          <p class="pdd">腹围</p>
          <input
            type="text"
            class="inputs"
            v-model="user.Get_CheckSub_Data1.Sub_Waistline"
          />
        </div>
      </div>
    </div>
    <div class="box3">
      <div class="bn1">
        <button class="bnn" type="" @click="starts(this.values)">
          开始评估
        </button>
      </div>
      <div class="bn2">
        <button class="bnn" type="" @click="last">医生自主评估</button>
      </div>
    </div>
  </div>
</template>
<script>
import { ElMessageBox, ElMessage } from "element-plus";
import FormDialog from "./FormDialog.vue";
import { userStore } from "../../stores/user.ts";
import ChildNavtor from "./child-navtor.vue";
export default {
  data() {
    return {
      packoptions: [
        {
          Pack_ID: "0",
          Pack_Name: "按体质类型",
        },
      ],
      values: "0",
      user: "",
      showDialog1: false,
      message1: "0",
      isDisabled: true,
    };
  },
  components: {
    ChildNavtor,
    FormDialog,
  },
  methods: {
    handleSubmit1() {
      this.showDialog1 = false;
      document.getElementById("box2").scrollIntoView({
        behavior: "smooth",
        block: "start",
      });
    },
    rank() {
      this.$router.push("/zytz");
    },
    ranks() {
      this.$router.push("/txm");
    },
    starts(option) {
      this.user.updateOption(option);
      if(this.user.Get_CheckSub_Data1.Check_No==null||this.user.Get_CheckSub_Data1.Check_No==""){
        ElMessage.error("请先选择体检人员信息");
      }else{
        this.$router.push({path:"/sys",query:{code:"0"}});
      }
      
    },
    last(){
      if(this.user.Get_CheckSub_Data1.Check_No==null||this.user.Get_CheckSub_Data1.Check_No==""){
        ElMessage.error("请先选择体检人员信息");
      }else{
        this.$router.push("/inference")
      }
    },
  },
  created() {
    this.user = userStore();
  },
};
</script>
<style scoped>
.title {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}
.pdd {
 font-size: 16px;
    width: 140px;
    height:40px;
    margin-right: 10px;
    text-align: right;
    line-height: 40px;
    display: inline-block;
}
.t1 {
  display: flex;
  margin-top: 20px;
}
.ry {
  display: flex;
  flex-wrap: wrap;
  padding: 10px;
  justify-content: space-between;
}
::v-deep .inputs {
  width: 290px;
  border: 1px solid black;
  font-size: 18px;
  height: 40px;
}
.t1 {
  display: flex;
}
.ee {
  display: flex;
}
.container {
  width: 100%;
  height: 100%;
  overflow: auto;
}

/* 在这里写入横屏时需要应用的CSS样式 */
.circle {
  width: 80px; /* 或者你想要的任何尺寸 */
  height: 80px; /* 宽高相等 */
  border-radius: 50%; /* 正圆的关键属性 */
  background-color: #917155; /* 背景颜色，仅为展示 */
  display: flex;
  justify-content: center;
  align-items: center;
}
::v-deep .box1 {
  height: 340px;
  background-color: #ffffff;
  background-image: url("../../assets/images/未标题-1.png");
  background-size: cover;
  /* 或者其他适合的值，如contain, auto等 */
  background-position: center;
  /* 或者其他位置值，如top left, bottom right等 */
  background-repeat: no-repeat;
  /* 防止背景图片重复 */
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

::v-deep .box2 {

  height: 100px;
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
}

::v-deep .box2-content p {
  line-height: 30px;
  letter-spacing: 1px;
  font-size: 20px;
}

::v-deep .box2-content {
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10rpx;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

::v-deep .box3 {
  height: 200px;
  background-color: #ffffff;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

::v-deep .bn1 .bn2 {
}

::v-deep .bnn {
  margin-top: 10px;
  width: 300px;
  height: 60px;
  background-color: #d3c3a9;
  font-size: 25px;
  color: #000000;
}
::v-deep .el-select {
  width: 300px !important;
}
::v-deep .el-select-dropdown .el-select-dropdown__item {
  font-size: 20px !important;
  width: 300px;
}

@media screen and (orientation: portrait) {
  ::v-deep .box1 {
    width: 100%;
    height: 365px;
    background-image: url("../../assets/images/画板 1.1.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: flex-end;

  }

  ::v-deep .box2 {

    height: 269px;
    background-color: #ffffff;
    border: 1px solid black;
    display: flex;
    padding: 20px;
    justify-content: center;
    align-items: center;
  }

  ::v-deep .box2-content p {
    line-height: 45px;
    letter-spacing: 1px;
    font-size: 27px;
  }
  ::v-deep .box2-content {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.1);
  }

  ::v-deep .box3 {
    height: 375px;
    background-color: #ffffff;
  }
  ::v-deep .bnn {
    margin-top: 10px;
    width: 300px;
    height: 50px;
    font-size: 25px;
    background-color: #d3c3a9;
    color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  ::v-deep .bn1 .bn2 {
    width: 100%;
    height: 100%;
  }
  ::v-deep .el-select {
    width: 300px !important;
  }
  ::v-deep .el-select__placeholder.is-transparent span {
    font-size: 22px;
    color: #000000;
  }
  ::v-deep .el-select__wrapper {
    height: 45px;
  }
  .el-select-dropdown__item {
    font-size: 22px !important;
  }

  ::v-deep .el-select__wrapper {
    font-size: 22px;
  }
}
</style>
